﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Search.ascx.cs"
    Inherits="Framework.Portal.Layouts.Client.Components.Teenio.Search" %>
    <div class="detail_event">
        <h1 class="title_event">
            <%= MENUNAME %>: <asp:Literal ID="lblSearch" runat="server" Text="Không thấy dữ liệu"></asp:Literal></h1>
        <asp:Repeater ID="rptContent" runat="server" OnItemDataBound="rptContent_ItemDataBound">
            <ItemTemplate>
                <div class="left_sapo">
                    <asp:Image ID="imgAvatar" BorderWidth="1" Width="110" Height="90" runat="server" ImageUrl="/Uploads/117/1/PreAvatar/ava3.jpg" />
                </div>
                <!--end:left_sapo -->
                <div class="right_sapo">
                    <h2 class="title_details">
                        <asp:HyperLink ID="hplTitle" runat="server" CssClass="title_a"></asp:HyperLink></h2>                   
                    <p>
                        <asp:Literal ID="lblTeaser" runat="server"></asp:Literal>
                    </p>
                </div>
                <!--end:right_sapo -->
                <br class="clear" />
                <small class="time com_like">
                    <asp:Literal ID="lblCreateDate" runat="server"></asp:Literal>
                    <span id="boxLike_<%# Eval("CONTENT_ID") %>"><a style="margin: 0 0 0 10px" href="javascript:;" onclick="DoVote(<%# Eval("CONTENT_ID") %>);">Thích</a></span>
                    <span id="boxView_<%# Eval("CONTENT_ID") %>"></span></small>
                <br class="clear" />
            </ItemTemplate>
            <AlternatingItemTemplate>
                <div class="left_sapo">
                    <asp:Image ID="imgAvatar" BorderWidth="1" Width="110" Height="90" runat="server" ImageUrl="/Uploads/117/1/PreAvatar/ava3.jpg" />
                </div>
                <!--end:left_sapo -->
                <div class="right_sapo">
                    <h2 class="title_details">
                        <asp:HyperLink ID="hplTitle" runat="server" CssClass="title_a"></asp:HyperLink></h2>                   
                        <asp:Literal ID="lblTeaser" runat="server"></asp:Literal>
                    </p>
                </div>
                <!--end:right_sapo -->
                <br class="clear" />
                <small class="time com_like">
                    <asp:Literal ID="lblCreateDate" runat="server"></asp:Literal>
                    <span id="boxLike_<%# Eval("CONTENT_ID") %>"><a style="margin: 0 0 0 10px" href="javascript:;" onclick="DoVote(<%# Eval("CONTENT_ID") %>);">Thích</a></span>
                    <span id="boxView_<%# Eval("CONTENT_ID") %>"></span></small>
                <br class="clear" />
            </AlternatingItemTemplate>
        </asp:Repeater>
        <ul class="page" style="margin: 0px;">
            <li class="next_back"><a href="#">Trước</a></li>
            <li><a href="#">1</a></li>
            <li><a href="#">2</a></li>
            <li><a href="#">3</a></li>
            <li><a href="#">4</a></li>
            <li>...</li>
            <li><a href="#">121</a></li>
            <li class="next_back"><a href="#">Sau</a></li>
            <br class="clear" />
        </ul>
        <br class="clear" />
    </div>
    <script type="text/javascript">
    var curentUser = <%= currentUserId %>;
    var arrayArticle = <%= arrayArticle %>;
    $(document).ready(function () {       
         $.each(arrayArticle, function(index, value) {
            $.ajax({
                type: "POST",
                cache: false,
                url: "Resources.ashx?module=contribution&action=getview",
                data: { "articleId": value},
                success: function (html) {
                    $("#boxView_" + value).html("<span class=\"dot\">·</span> " + html + " lượt nghe");
                },
                timeout: 5000,
                complete: function () {  

                 }
            });
        });        
    });
    </script>